-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more Momentum options, mostly related to hFac #809
Open
jm-c
wants to merge
23
commits into
MITgcm:master
Choose a base branch
from
jm-c:try_mom_choice
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This switch allows to compute Coriolis terms, both horizontal (in 2.Omega.sin(Phi)) and NH (in 2.Omega.cos(Phi)), using the averaged transport (with face edge length and hFac factor), as done previously in V.I. for horizontal Coriolis.
For deep-model, absorb the NH-metric terms w.(u,v)/r into vertical advection by advecting the product "deepFac x (u,v)" (instead of just u,v).
- Add recip_hFacW/S (previously commented out) in new expression (selectCoriScheme=4) of NH coriolis f'*W term - remove hFacW/S from gW-Cori in selectCoriScheme=4 code and keep previous selectCoriScheme=4 code (with hFacW/S) under selectCoriScheme=6 block
- New Spherical-Metric term form using grid-spacing finite differences (instead of analytical tan(Phi)/rSphere), supposed to improve both AM and KE conservation. Used (turned on) when selectVortScheme=1,2. - Add option to absorb the spherical-metric terms uMetricTerms = u.v.tanPhi/r into meridional advection by advecting the product "dxC x u" (instead of just u). Used (turned on) when selectVortScheme=2. Note: for now, re-cycle Flux-Form unused param "selectVortScheme" for this.
This option (selectCoriScheme=6, in mom_w_coriolis_nh.F) was left from early test, with hFacW/S multiplying uVel,vVel, but without scaling by any recip_hFac. The changes here fix this issue as the gW-Cori term is now divided by the grid-cell thickness at the wVel location (new argument recip_rThickC).
Two improvements: - single CPP option "MOM_USE_OLD_DEEP_VERT_ADV" in MOM_COMMON_OPTIONS.h to disable changes to vertical advection for deepAtmosphere=T - fix for the case useNHTerms=F with deepAtmosphere=T. Done by keeping a local copy of deepFacC in MOM_VISC.h, and adding 1 new argument to S/R mom_u_adv_wu.F, mom_v_adv_wv.F, mom_vi_{u,v}_vertshear.F
This new option (with selectCortScheme=4) skip the division of vorticity by hFacZ and replace it with tendency scaling by recip_hFacW/S Also: - remove code related to "upwindVort3" (was hard-coded to FALSE) - add some missing "_d 0" ; + minor indentation changes
no need to hack selectCoriScheme params and leave mom_vi_coriolis.F unchanged
- no need to hack selectVortScheme param - compute advection tendency in separated block if selectMetricTerms This makes sure results will not be affected (at trucation level) with current default metric-terms. - minor cleaning in mom_u/v_coriolis.F and mom_u/v_adv_wu/v.F
also rename 2 local variables (vF & v4F) more inline with other S/R and improve description
using vector-invariant momentum
With deep-model, gU,gV NHMtTerms have been moved inside vertical momentum advection and this affects results (11 remaining matching digits for cg2d); update primary test ref. output and add ref-output for new (vector-inv) secondary test.
I think this PR is ready for review: I updated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes does this PR introduce?
Alternative discretization related to hFac for few momentum tendency terms that greatly improve Angular-Momentum (AM) conservation in one weakly-forced, deep NH model set-up with zonally uniform geometry.
Some choices are certainly useful to have (first in the list) whereas some other might not add much.
These new choices are, starting from the most useful and/or with larger impact on AM-budget:
mom_u,v_coriolis.F
) :use averaged transport so that the column integrated Coriolis tendency (gU,gV) match the Coriolis parameter times the integrated transport ( +f.V, -f.U )
mom_vi_u,v_coriolis.F
) :by-pass division by
hFacZ
and instead applyrecip_hFacW/S
on final tendency.Note: this fixes AM-conservation but breaks vorticity tendency matching advection of vorticity
pkg/mom_common
, 3-d Coriolis, select3dCoriScheme= 2,3 (mom_u,v,w_coriolis_nh.F
) :Alternative discretization using averaged transport ; distinction betewenn 2 and 3 only for vertical momentum tendency gW (but unclear which one is better/more consistent).
This exactly conserves AM and also simplify (+ speeds up) the code by skipping completely the NH metric-terms calculation for horizontal momentum tendency.
No run-time switch but a CPP option "MOM_USE_OLD_DEEP_VERT_ADV" (in
MOM_COMMON_OPTIONS.h
) allows to recover the explicit NH metric-term calculation.<-- this affects many routines in the 3 momentum pkgs, including
mom_init_fixed.F
,MOM_VISC.h
inpkg/mom_common
+ new argument to vertical advection S/R (inmom_fluxform
&mom_vecinv
pkgs).mom_fluxform.F
,mom_u,v_metric_sphere.F
,mom_u_adv_vu.F
) :More accurate discretization, involves similar averaving as the ones described in manual eq. 2.102 & 2.103 but instead centered at grid-cell corner.
Also offer the option (selectMetricTerms=3) to skip the gU spherical metric term by advecting uVel*dxC (simpler, faster, and exactly conserve AM).
What is the current behaviour?
What is the new behaviour
Does this PR introduce a breaking change?
Other information:
Suggested addition to
tag-index
to be filled later